﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using UIShare;
using EFong.View.Login;
using System.Threading;
using System.Globalization;
using System.Diagnostics;

namespace EFong.View
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            AppParameters.SystemName = "毅丰票务管理系统(测试版)";

            AppSkin.InitSkin();
            AppLocalization.InitLocalization();

            Stopwatch sw = new Stopwatch();
            sw.Start();

            PreloadForms();

            sw.Stop();
            Console.WriteLine(sw.Elapsed);

            Frm_Login login = new Frm_Login();

            if(login.ShowDialog() == DialogResult.OK)
                Application.Run(new Frm_Main());
            //Application.Run(new Form1());
        }

        static void PreloadForms()
        {
            FormPreloader.Preload(
                //new EFong.View.BankAccount.Frm_BankAccount(),
                //new EFong.View.BankAccount.Frm_FundsTransfer(),
                //new EFong.View.BankAccount.Frm_OtherPayment(),
                //new EFong.View.Base.Frm_CurrencyManager(),
                //new EFong.View.Customer.Frm_Customer(),
                //new EFong.View.Customer.Frm_CustomerEdit(),
                //new EFong.View.Customer.Frm_PassengerEdit(),
                //new EFong.View.Customer.Frm_SetWebUser(),
                //new EFong.View.Data.Frm_DataExport(),
                //new EFong.View.Data.Frm_DataImport(),
                //new EFong.View.Documentation.Frm_InsurancePolicyManager(),
                //new EFong.View.Documentation.Frm_JourneyOrderManager(),
                //new EFong.View.Documentation.Frm_NewInsurancePolicy(),
                //new EFong.View.Documentation.Frm_NewJourneyOrder(),
                //new EFong.View.Financing.Frm_CustomerSettlement(),
                //new EFong.View.Financing.Frm_VendorSettlement(),
                //new EFong.View.FlightTicket.Frm_FlightTicket()//,
                //new EFong.View.FlightTicket.Frm_FlightTicketChange(),
                //new EFong.View.FlightTicket.Frm_FlightTicketEdit(),
                //new EFong.View.FlightTicket.Frm_FlightTicketReturn(),
                //new EFong.View.HotelBooking.Frm_HotelBooking(),
                //new EFong.View.HotelBooking.Frm_HotelBookingEdit(),
                //new EFong.View.HotelBooking.Frm_HotelBookingDetailEdit(),
                //new EFong.View.IntergralExchange.Frm_IntergralExchange(),
                //new EFong.View.IntergralExchange.Frm_IntergralExchangeEdit(),
                //new Frm_Main()//,
                new EFong.View.OtherBusiness.Frm_OtherBusiness()//,
                //new EFong.View.OtherBusiness.Frm_OtherBusinessEdit(),
                //new EFong.View.Project.Frm_Project(),
                //new EFong.View.Project.Frm_ProjectEdit(),
                //new EFong.View.Security.Frm_Role(),
                //new EFong.View.Security.Frm_User(),
                //new EFong.View.TrainTicket.Frm_TrainTicket(),
                //new EFong.View.TrainTicket.Frm_TrainTicketEdit(),
                //new EFong.View.TrainTicket.Frm_TrainTicketReturn(),
                //new EFong.View.TrainTicket.Frm_TrainTicketDetailEdit(),
                //new EFong.View.Vendor.Frm_Vendor(),
                //new EFong.View.Vendor.Frm_VendorEdit(),
                //new EFong.View.Report.Frm_供应商账单(),
                //new EFong.View.Report.Frm_固定费用报表(),
                //new EFong.View.Report.Frm_利润表(),
                //new EFong.View.Report.Frm_零散支出报表(),
                //new EFong.View.Report.Frm_每日订单报表(),
                //new EFong.View.Report.Frm_已付款报表(),
                //new EFong.View.Report.Frm_已收款报表(),
                //new EFong.View.Report.Frm_银行对账单(),
                //new EFong.View.Report.Frm_应付款报表(),
                //new EFong.View.Report.Frm_应收款报表(),
                //new EFong.View.Report.Frm_月结对账单(),
                //new EFong.View.Report.Frm_资金流动报表()
            );
        }
    }
}
